.class public Lnbisdk/iq;
.super Ljava/lang/Object;

# interfaces
.implements Lnbisdk/iz;


# static fields
.field private static mf:Lnbisdk/jg;

.field private static mg:Lnbisdk/jg;

.field private static mh:Lnbisdk/jg;

.field private static mi:Lnbisdk/jg;

.field private static mj:Lnbisdk/jg;


# instance fields
.field private mk:Lnbisdk/mq;

.field private ml:Lcom/navbuilder/nb/NBException;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method constructor <init>(Lnbisdk/mq;)V
    .locals 2

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    if-nez p1, :cond_0

    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "Listener cannot be null"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_0
    iput-object p1, p0, Lnbisdk/iq;->mk:Lnbisdk/mq;

    sget-object v0, Lnbisdk/iq;->mh:Lnbisdk/jg;

    if-eqz v0, :cond_1

    sget-object v0, Lnbisdk/iq;->mi:Lnbisdk/jg;

    if-eqz v0, :cond_1

    sget-object v0, Lnbisdk/iq;->mj:Lnbisdk/jg;

    if-nez v0, :cond_2

    :cond_1
    new-instance v0, Lnbisdk/pi;

    invoke-direct {v0, p0}, Lnbisdk/pi;-><init>(Lnbisdk/iq;)V

    invoke-virtual {v0}, Lnbisdk/pi;->start()V

    :cond_2
    return-void
.end method

.method public static a(Lnbisdk/ri;Ljava/lang/String;J)V
    .locals 7

    const/4 v6, 0x1

    new-instance v0, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V

    move-wide v1, p2

    :cond_0
    const-wide/16 v3, 0xff

    and-long/2addr v3, v1

    long-to-int v3, v3

    invoke-virtual {v0, v3}, Ljava/io/ByteArrayOutputStream;->write(I)V

    const/16 v3, 0x8

    shr-long/2addr v1, v3

    const-wide/16 v3, 0x0

    cmp-long v3, v1, v3

    if-gtz v3, :cond_0

    invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v0

    array-length v1, v0

    div-int/lit8 v2, v1, 0x2

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v2, :cond_1

    aget-byte v4, v0, v3

    sub-int v5, v1, v3

    sub-int/2addr v5, v6

    aget-byte v5, v0, v5

    aput-byte v5, v0, v3

    sub-int v5, v1, v3

    sub-int/2addr v5, v6

    aput-byte v4, v0, v5

    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_1
    invoke-virtual {p0, p1, v0}, Lnbisdk/ri;->c(Ljava/lang/String;[B)V

    return-void
.end method

.method public static b(Lnbisdk/fk;Ljava/lang/String;)J
    .locals 2

    invoke-virtual {p0, p1}, Lnbisdk/fk;->e(Ljava/lang/String;)[B

    move-result-object v0

    invoke-static {v0}, Lnbisdk/pc;->s([B)J

    move-result-wide v0

    return-wide v0
.end method

.method static gD()Lnbisdk/jg;
    .locals 1

    sget-object v0, Lnbisdk/iq;->mh:Lnbisdk/jg;

    return-object v0
.end method

.method static gE()Lnbisdk/jg;
    .locals 1

    sget-object v0, Lnbisdk/iq;->mf:Lnbisdk/jg;

    return-object v0
.end method

.method static gF()Lnbisdk/jg;
    .locals 1

    sget-object v0, Lnbisdk/iq;->mg:Lnbisdk/jg;

    return-object v0
.end method

.method static gG()Lnbisdk/jg;
    .locals 1

    sget-object v0, Lnbisdk/iq;->mi:Lnbisdk/jg;

    return-object v0
.end method

.method static gH()Lnbisdk/jg;
    .locals 1

    sget-object v0, Lnbisdk/iq;->mj:Lnbisdk/jg;

    return-object v0
.end method


# virtual methods
.method public final a(Lnbisdk/dz;)V
    .locals 0

    return-void
.end method

.method public final a(Lnbisdk/dz;I)V
    .locals 0

    return-void
.end method

.method public final a(Lnbisdk/dz;Lcom/navbuilder/nb/NBException;)V
    .locals 3

    iput-object p2, p0, Lnbisdk/iq;->ml:Lcom/navbuilder/nb/NBException;

    const-wide/32 v0, 0x8000000

    const/4 v2, 0x2

    invoke-static {p2, v0, v1, v2}, Lnbisdk/pn;->a(Ljava/lang/Throwable;JB)V

    return-void
.end method

.method public final a(Lnbisdk/dz;Lnbisdk/fk;)V
    .locals 0

    return-void
.end method

.method public final b(Lnbisdk/dz;)V
    .locals 4

    new-instance v0, Lcom/navbuilder/nb/NBException;

    const/16 v1, 0x1005

    const-string v2, "Map tile source url timeout"

    invoke-direct {v0, v1, v2}, Lcom/navbuilder/nb/NBException;-><init>(ILjava/lang/String;)V

    iput-object v0, p0, Lnbisdk/iq;->ml:Lcom/navbuilder/nb/NBException;

    const-string v0, "Timeout when requesting tile map url"

    const-wide/32 v1, 0x8000000

    const/4 v3, 0x2

    invoke-static {v0, v1, v2, v3}, Lnbisdk/pn;->a(Ljava/lang/String;JB)V

    return-void
.end method

.method final e(Lnbisdk/jg;)V
    .locals 2

    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    const-string v1, "road"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    sput-object p1, Lnbisdk/iq;->mh:Lnbisdk/jg;

    iget-object v0, p0, Lnbisdk/iq;->mk:Lnbisdk/mq;

    invoke-interface {v0, p1}, Lnbisdk/mq;->f(Lnbisdk/jg;)V

    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    sget-object v1, Lnbisdk/iq;->mh:Lnbisdk/jg;

    invoke-virtual {v1}, Lnbisdk/jg;->getUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lnbisdk/cq;->a(BLjava/lang/String;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    const-string v1, "route"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    sput-object p1, Lnbisdk/iq;->mi:Lnbisdk/jg;

    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x2

    sget-object v1, Lnbisdk/iq;->mi:Lnbisdk/jg;

    invoke-virtual {v1}, Lnbisdk/jg;->getUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lnbisdk/cq;->a(BLjava/lang/String;)V

    goto :goto_0

    :cond_2
    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    const-string v1, "traffic"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    sput-object p1, Lnbisdk/iq;->mj:Lnbisdk/jg;

    sget-boolean v0, Lnbisdk/bk;->cG:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    sget-object v1, Lnbisdk/iq;->mj:Lnbisdk/jg;

    invoke-virtual {v1}, Lnbisdk/jg;->getUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lnbisdk/cq;->a(BLjava/lang/String;)V

    goto :goto_0

    :cond_3
    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    const-string v1, "satellite"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_4

    sput-object p1, Lnbisdk/iq;->mf:Lnbisdk/jg;

    iget-object v0, p0, Lnbisdk/iq;->mk:Lnbisdk/mq;

    invoke-interface {v0, p1}, Lnbisdk/mq;->f(Lnbisdk/jg;)V

    goto :goto_0

    :cond_4
    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    const-string v1, "hybrid"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    sput-object p1, Lnbisdk/iq;->mg:Lnbisdk/jg;

    iget-object v0, p0, Lnbisdk/iq;->mk:Lnbisdk/mq;

    invoke-interface {v0, p1}, Lnbisdk/mq;->f(Lnbisdk/jg;)V

    goto :goto_0
.end method

.method final gI()Lcom/navbuilder/nb/NBException;
    .locals 1

    iget-object v0, p0, Lnbisdk/iq;->ml:Lcom/navbuilder/nb/NBException;

    return-object v0
.end method
